﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Entities.Auditing;
using FwProject.ShoppingMall.Com;
using FwProject.ShoppingMall.Shop;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// 购物车模型
    /// </summary>
    [AutoMap(typeof(ShopCar))]
    public class ShopCarDto: EntityDto<Guid>, ICreationAudited
    {
        /// <summary>
        /// 用户id
        /// </summary>
        [Display(Name = "用户编号")]
        public long UserId { get; set; }

        /// <summary>
        /// 商品ID
        /// </summary>
        [Display(Name = "商品编号")]
        public Guid ShopproductId { get; set; }
        /// <summary>
        /// 商品数量
        /// </summary>
        [Display(Name = "商品数量")]
        public int ProductCount { get; set; }
        /// <summary>
        /// 规格编号
        /// </summary>
        [Display(Name = "规格编号")]
        public Guid ShopSkuId { get; set; } = Guid.Empty;
        [Display(Name = "规格名称")]
        public string ShopSkuName { get; set; }
        /// <summary>
        /// 购物价格
        /// </summary>
        public decimal TempPrcie { get; set; }
        /// <summary>
        /// 购物车产品
        /// </summary>
        public ShopProductCarDto ShopProductCarDto { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DateTime CreationTime { get; set; }

        public int PayMaxCount { get; set; } = 0;


    }
    /// <summary>
    /// 购物车产品模型
    /// </summary>
    public class ShopProductCarDto {

        /// <summary>
        /// 商品分类id
        /// </summary>
        [Display(Name = "商品分类编号")]
        public Guid ShopTypeid { get; set; }

        /// <summary>
        /// 产品宣传图片
        /// </summary>
        [Display(Name = "商品宣传图片")]
       
        public string ImagePic { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [Display(Name = "商品名称")]
        public string ProductName { get; set; }
        /// <summary>
        /// 商品编号
        /// </summary>
        [Display(Name = "商品编号")]
        public string ProductNumber { get; set; }
        /// <summary>
        /// 商品介绍
        /// </summary>
        [Display(Name = "商品介绍")]
        public string ProductDetails { get; set; }
        /// <summary>
        /// 规格销售价
        /// </summary>
        [Display(Name = "规格销售价")]
        public decimal SpcemarketPrice { get; set; } = 0m;

        /// <summary>
        /// 重量
       /// </summary>
        [Display(Name = "重量")]

        public float SpceWeight { get; set; } = 0;


        [Display(Name = "单位")]
        public string Unit { get; set; }

        /// <summary>
        /// 产品的售卖方式
        /// </summary>
        public ShopProductFlag ShopProductFlag { get; set; } = ShopProductFlag.正常;

    }

}
